FIG. 1 is a schematic diagram illustrating a principle of a conventional file packing and unpacking process. A target file is encrypted by an encryption/decryption algorithm to obtain an encrypted target file (i.e., the target file after being encrypted). Then, the encrypted target file is embedded into a packed target file (i.e., the target file after being packed). In addition, an algorithm key (secrete key) required by the encryption/decryption algorithm and the encryption/decryption algorithm are also embedded in the packed target file. The packing operation is to compress executable program resources. It is a frequently-used means for protecting a file. A program after being packed can be executed directly. But source codes of the program cannot be seen without an unpacking operation.
For a file unpacking procedure, after the packed target file is obtained, the encryption/decryption algorithm in the packed target file is executed automatically, so as to decrypt the encrypted target file in the packed target file and to obtain the original target file. The file unpacking process ends after the original target file is loaded.